Valid for Sitecore
5.2, 5.1.1
Add the GetItemDefinition Method
Prev Next |
The Hello World provider always returns the same hard-coded item, regardless of what itemID is requested. Create the method using the source code shown below.
1. GetItemDefinition
1 public override ItemDefinition GetItemDefinition(ID itemID, CallContext context)
2 {
3 Assert.ArgumentNotNull(itemId, "itemId");
4 Assert.ArgumentNotNull(context, "context");
5 if ((!ID.IsNullOrEmpty(itemId) && (itemId != this.TitleId)) && (itemId != this.TemplateId))
6 {
7 return new ItemDefinition(itemId, this.ItemName, this.TemplateId, this.MasterId);
8 }
9 return null;
10 }
Prev Next